﻿namespace NthDownload.Common.Plugins
{
    public static class DownloadPluginContractNameService
    {
        #region Static Methods

        /// <summary>
        /// Creates a contract name suitable for registering a download factory with an MEF container
        /// </summary>
        /// <param name="downloadPluginGUID">The GUID of the download plugin which will spawn the factory.</param>
        public static string CreateDownloadFactoryContractName(string downloadPluginGUID)
        {
            return string.Format("{0}{1}", "DF-", downloadPluginGUID);
        }

        /// <summary>
        /// Creates a contract name suitable for registering a download UIService with an MEF container
        /// </summary>
        /// <param name="downloadPluginGUID">The GUID of the download plugin which will spawn the UIService.</param>
        public static string CreateDownloadUIServiceContractName(string downloadPluginGUID)
        {
            return string.Format("{0}{1}", "DUIS-", downloadPluginGUID);
        }

        /// <summary>
        /// Creates a contract name suitable for registering a download serialization service with an MEF container
        /// </summary>
        /// <param name="downloadPluginGUID">The GUID of the download plugin which will spawn the serialization service.</param>
        public static string CreateDownloadXmlSerializationServiceContractName(string downloadPluginGUID)
        {
            return string.Format("{0}{1}", "DSPXML-", downloadPluginGUID);
        }

        #endregion Static Methods
    }
}
